<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/shopOrder/cardRecharge/list" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<%-- <td>店铺名称：<input type="text" name="shopName" value="${requestScope.dwzPageBean.countResultMap.shopName}" placeholder="输入店铺名称" /></td> --%>
					<td>店铺名称：
						<input size="30" placeholder="请输入店铺名称" name="org2.shopName" type="text" postField="shopName" suggestFields="shopName" 
						suggestUrl="${pageContext.request.contextPath}/shopOrder/cardRecharge/getShopName" lookupGroup="org2" 
						value="${requestScope.dwzPageBean.countResultMap.shopName}" />
					</td>
					<td>下单时间：<input name="startTime" class="date textInput readonly" readonly="true" type="text" value="${requestScope.dwzPageBean.countResultMap.startTime}" placeholder="请输入下单时间" style="margin-right: 5px;">
					至<input style="margin-left: 5px;" name="endTime" class="date textInput readonly" readonly="true" type="text" value="${requestScope.dwzPageBean.countResultMap.endTime}" placeholder="请输入下单时间"></td>
					<%-- <td>会员卡类型：<input type="text" name="typeName" value="${requestScope.dwzPageBean.countResultMap.typeName}" placeholder="请输入会员卡类型" /></td> --%>
					<td>会员卡类型：<input size="30" placeholder="请输入会员卡类型" name="org1.typeName" type="text" postField="typeName" suggestFields="typeName" suggestUrl="${pageContext.request.contextPath}/shopOrder/cardRecharge/getTypeName" lookupGroup="org1" value="${requestScope.dwzPageBean.countResultMap.typeName}" /></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
<div class="panelBar">
<ul class="toolBar">
			<shiro:hasPermission name="/shopOrder/cardRecharge/export">
				<li><a href="${pageContext.request.contextPath}/shopOrder/cardRecharge/export" target="dwzExport" targetType="navTab" title="确定要导出这些记录吗?" class="icon"><span>导出EXCEL</span></a></li>
			</shiro:hasPermission>
		</ul>
</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<!-- <th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th> -->
				<th orderField="shopName" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'shopName'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>店铺名称</th>
				<th orderField="memberName" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'memberName'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>会员名称</th>
				<th orderField="memberPhone" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'memberPhone'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>手机号 </th>
				<th orderField="memberSex" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'memberSex'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>性别 </th>
				<th orderField="memberCardNum" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'memberCardNum'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>会员卡编号 </th>
				<th orderField="typeName" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'typeName'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>会员卡类型 </th>
				<th orderField="discount" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'discount'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>卡折扣 </th>
				<th orderField="rechargeMoney" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'rechargeMoney'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>充值金额</th>
				<th orderField="addTime" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'addTime'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>充值时间</th>
				<th orderField="payType" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'payType'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>支付类型 </th>
				<th orderField="operator" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'operator'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>操作人</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr>
						<td>${record.shopName 		}</td>
						<td>${record.memberName 	}</td>
						<td>${record.memberPhone 	}</td>
						<td>${record.memberSex == 0 ? "女":"男"  	}</td>
						<td>${record.memberCardNum}</td>
						<td>${record.typeName 	}</td>
						<td>${record.discount 	}</td>
						<td>${record.rechargeMoney*0.01}</td>
						<td><fmt:formatDate pattern="yyyy-MM-dd" value="${record.addTime}" /></td>
						<td>${record.payType == 0 ? '微信支付': ''}${record.payType == 1 ? '支付宝支付': ''}${record.payType == 2 ? '现金': ''}${record.payType == 3 ? '会员卡支付': ''}</td>
						<td>${record.operator 	}</td>
					</tr>
				</c:forEach>
			</c:if>

		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>